import 'package:flutterdemo/generated/json/base/json_convert_content.dart';
import 'package:flutterdemo/generated/json/base/json_field.dart';

class FaceDetectEntity with JsonConvert<FaceDetectEntity> {
	@JSONField(name: "error_code")
	int errorCode;
	@JSONField(name: "error_msg")
	String errorMsg;
	@JSONField(name: "log_id")
	int logId;
	int timestamp;
	int cached;
	FaceDetectResult result;
}

class FaceDetectResult with JsonConvert<FaceDetectResult> {
	@JSONField(name: "face_num")
	int faceNum;
	@JSONField(name: "face_list")
	List<FaceDetectResultFaceList> faceList;
}

class FaceDetectResultFaceList with JsonConvert<FaceDetectResultFaceList> {
	@JSONField(name: "face_token")
	String faceToken;
	FaceDetectResultFaceListLocation location;
	@JSONField(name: "face_probability")
	int faceProbability;
	FaceDetectResultFaceListAngle angle;
	FaceDetectResultFaceListExpression expression;
	FaceDetectResultFaceListGlasses glasses;
	FaceDetectResultFaceListQuality quality;
	@JSONField(name: "eye_status")
	FaceDetectResultFaceListEyeStatus eyeStatus;
	FaceDetectResultFaceListEmotion emotion;
	@JSONField(name: "face_type")
	FaceDetectResultFaceListFaceType faceType;
	FaceDetectResultFaceListGender gender;
}

class FaceDetectResultFaceListLocation with JsonConvert<FaceDetectResultFaceListLocation> {
	double left;
	double top;
	int width;
	int height;
	int rotation;
}

class FaceDetectResultFaceListAngle with JsonConvert<FaceDetectResultFaceListAngle> {
	double yaw;
	double pitch;
	double roll;
}

class FaceDetectResultFaceListExpression with JsonConvert<FaceDetectResultFaceListExpression> {
	String type;
	int probability;
}

class FaceDetectResultFaceListGlasses with JsonConvert<FaceDetectResultFaceListGlasses> {
	String type;
	int probability;
}

class FaceDetectResultFaceListQuality with JsonConvert<FaceDetectResultFaceListQuality> {
	FaceDetectResultFaceListQualityOcclusion occlusion;
	int blur;
	int illumination;
	int completeness;
}

class FaceDetectResultFaceListQualityOcclusion with JsonConvert<FaceDetectResultFaceListQualityOcclusion> {
	@JSONField(name: "left_eye")
	double leftEye;
	@JSONField(name: "right_eye")
	double rightEye;
	int nose;
	int mouth;
	@JSONField(name: "left_cheek")
	double leftCheek;
	@JSONField(name: "right_cheek")
	double rightCheek;
	@JSONField(name: "chin_contour")
	int chinContour;
}

class FaceDetectResultFaceListEyeStatus with JsonConvert<FaceDetectResultFaceListEyeStatus> {
	@JSONField(name: "left_eye")
	int leftEye;
	@JSONField(name: "right_eye")
	int rightEye;
}

class FaceDetectResultFaceListEmotion with JsonConvert<FaceDetectResultFaceListEmotion> {
	String type;
	double probability;
}

class FaceDetectResultFaceListFaceType with JsonConvert<FaceDetectResultFaceListFaceType> {
	String type;
	double probability;
}

class FaceDetectResultFaceListGender with JsonConvert<FaceDetectResultFaceListGender> {
	String type;
	int probability;
}
